package ch.fhnw.qualiscan.application.elements;

import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;

@SuppressWarnings("serial")
public class QuestionHeader extends HorizontalLayout {
	
	int numbering;
	String questionText;

	public QuestionHeader(int counter, String text, boolean space) {
		
		this.numbering = counter;
		this.questionText = text;
		
		setWidth("100%");
		setSpacing(true);
		setMargin(true, true, true, false);
		if(space == true) {
			setHeight("80px");
		}
		setStyleName("questionHeader");
		
		Label numb = new Label("" + numbering);
		numb.setStyleName("bigNumber");
		numb.setWidth("30px");
		addComponent(numb);
		
		Label questionText = new Label(text);
		addComponent(questionText);
		setExpandRatio(questionText, 1.0f);
		
		HorizontalLayout formWrap = new HorizontalLayout();
		formWrap.setWidth("290px");
		this.addComponent(formWrap);
	}
	
}
